
#set(file_ ${IN_FILE}.cpp)
message("Generating ${OUT_FILE} using ${IN_FILE}")

# for info see: ./app/src/processing/app/preproc/PdePreprocessor.java

#  String importRegexp = "^\\s*#include\\s+[<\"](\\S+)[\">]";
#    programImports = new ArrayList<String>();
#    String[][] pieces = PApplet.matchAll(program, importRegexp);



#  public ArrayList<String> prototypes(String in) {
#    in = collapseBraces(strip(in));
#
#    // XXX: doesn't handle ... varargs
#    // XXX: doesn't handle function pointers
#    Pattern pattern = Pattern.compile("[\\w\\[\\]\\*]+\\s+[&\\[\\]\\*\\w\\s]+\\([&,\\[\\]\\*\\w\\s]*\\)(?=\\s*\\{)");
#
#    ArrayList<String> matches = new ArrayList<String>();
#    Matcher matcher = pattern.matcher(in);
#    while (matcher.find())
#      matches.add(matcher.group(0) + ";");
#
#    return matches;
#  }

#we might need 2 generated files, a stripped file (removing comments, then removing function bodies...) and the .cpp file.



file(WRITE ${OUT_FILE}
  "#include <${ARDUINO_HEADER_FILE}>\n"
  "//this is where the forward declerations go\n"
  "#include \"${IN_FILE}\"\n"
)
